﻿/*********************
*验证用户Email是否重复
************************/
function VatUserEmail()
{
    var email=document.getElementById("txtEmail").value;
    
    if(email=="")
    {
        alert("Email输入错误!");
        return ;    
    } 
   // alert(email); 
     $j.ajax
      (
        {
            type:"POST",
            url:"/Handler/UserRegEmail.ashx",
            data:"email=" + email,
            success: function(ret)
            {
                if(ret == "0")
                {
                   EmailTS('Email可以使用','Green');  
                }
                else
                {
                  if( ret == "1"|| ret == "2"|| ret == "3")
                  {
                     EmailTS('Email重复,请重新输入!','Red');
                  }
                  else
                  {
                    EmailTS(ret, 'Red')
                  }  
                }
            },
            error: function()
            {
              
            }
        }
      );
}